/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    background: #0f0e17;
    color: #fffffe;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* 背景装饰 */
.bg-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    background-image:
            radial-gradient(circle at 20% 30%, rgba(131, 56, 236, 0.1) 0%, transparent 40%),
            radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.1) 0%, transparent 40%);
}

/* 卡片基础样式 */
.login-card, .register-card {
    background: rgba(18, 18, 24, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    transition: all 0.5s ease;
}

/* 游戏标志 */
.game-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.game-logo i {
    font-size: 48px;
    color: #ff8906;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(255, 137, 6, 0.5);
}

.game-logo h1 {
    font-size: 28px;
    color: #fffffe;
    letter-spacing: 1px;
}

/* 表单样式 */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a7a9be;
    transition: all 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fffffe;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ff8906;
    box-shadow: 0 0 0 3px rgba(255, 137, 6, 0.2);
}

.form-group input:focus + label {
    color: #ff8906;
}

/* 密码切换按钮 */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #a7a9be;
    cursor: pointer;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #ff8906;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input {
    margin-right: 8px;
    accent-color: #ff8906;
}

.remember-me span {
    color: #a7a9be;
    transition: color 0.3s ease;
}

.remember-me:hover span {
    color: #fffffe;
}

.forgot-password {
    color: #ff8906;
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #ffac41;
    text-decoration: underline;
}

/* 按钮样式 */
.login-btn, .register-btn {
    width: 100%;
    padding: 15px;
    background: #ff8906;
    color: #0f0e17;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover, .register-btn:hover {
    background: #ffac41;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 137, 6, 0.3);
}

.login-btn:active, .register-btn:active {
    transform: translateY(0);
}

/* 注册/登录提示 */
.register-prompt, .login-prompt {
    margin-top: 25px;
    text-align: center;
    color: #a7a9be;
    font-size: 14px;
}

.register-prompt a, .login-prompt a {
    color: #ff8906;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.register-prompt a:hover, .login-prompt a:hover {
    color: #ffac41;
    text-decoration: underline;
}

/* 消息提示框样式调整 */
.message-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 成功提示 - 绿色系 */
.message-box.success {
    background: #10b981; /* 深绿色背景 */
    color: #ffffff; /* 白色文字 */
    border: 1px solid #059669; /* 深一点的绿色边框 */
}

/* 异常提示 - 红色系 */
.message-box.error {
    background: #ef4444; /* 红色背景 */
    color: #ffffff; /* 白色文字 */
    border: 1px solid #dc2626; /* 深一点的红色边框 */
}

/* 隐藏/显示类 */
.hidden {
    display: none;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-card, .register-card {
    animation: fadeIn 0.5s ease forwards;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-card, .register-card {
        padding: 30px 20px;
    }

    .game-logo i {
        font-size: 40px;
    }

    .game-logo h1 {
        font-size: 24px;
    }

    .form-group input {
        padding: 12px 12px 12px 40px;
        font-size: 15px;
    }

    .login-btn, .register-btn {
        padding: 12px;
        font-size: 15px;
    }
}